package com.qf.exception;

import com.qf.utils.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {


    @ExceptionHandler(CustomerException.class)
    public R exceptionHandler (CustomerException e) {
        return R.fail(e.getCode(), e.getMsg());
    }
}
